package com.lighting.smssystem.configuration;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.lighting.smssystem.utils.mybatis.UserRoleTypeHandler;
import com.lighting.smssystem.utils.mybatis.UserStatusTypeHandler;
import org.apache.ibatis.type.MappedTypes;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author leemaster
 * @Title: MybatisConfiguration
 * @Package com.lighting.smssystem.configuration
 * @Description:
 * @date 2019-06-0123:46
 */
@Configuration
@EnableTransactionManagement
@MapperScan("com.lighting.smssystem.mapper")
@MappedTypes(value = {UserRoleTypeHandler.class, UserStatusTypeHandler.class})
public class MybatisConfiguration {

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
